import db from "@src/dataBase/db";
import Sequelize from "sequelize";

const File = db.define('file',
  {
    id: {type: Sequelize.STRING, primaryKey: true},
    size: {type: Sequelize.INTEGER},
    type: {type: Sequelize.STRING(20)},
    path: {type: Sequelize.STRING},
    created_at: {type: Sequelize.BIGINT},
    updated_at: {type: Sequelize.BIGINT},
  },
  {
    // 阻止自动创建开始和更新时间
    timestamps: false,
    // 以下划线命名字段
    underscored: true,
    // 表名
    tableName: "file",
  },
);

export default File;